﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace DMS.Logic
{
	public class DocumentLibraryLogic
	{
		public void AddDocument(string name, string originalName,int folderId,  Stream source)
		{
			Document doc = new Document();
			doc.Name = name;
			doc.OriginalFileName = originalName;
			doc.FolderId = folderId;
			doc.Save();
			doc.Write(source);
		}
	}
}
